import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/auth/local',
    method: 'POST',
    data
  })
}
// 注册用户  /auth/local/register
export function Register(data) {
  return request({
    url: '/auth/local/register',
    method: 'post',
    data
  })
}

export function getInfo() {
  return request({
    url: '/users/me'

  })
}

export function logout() {
  return request({
    url: '/vue-admin-template/user/logout',
    method: 'post'

  })
}

// 获取当前用户权限
export function getMypermissions() {
  return request.get('/mypermissions')
}
